import request from '@/utils/request'

// 登录接口
export function loginApi(data) {
  return request({
    url: '/auth/local',
    method: 'post',
    data
  })
}

// 注册用户
export function registerApi(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 获取当前用户信息
export function getUserInfo() {
  return request({
    url: '/users/me'
  })
}

// 获取当前用户权限
export function getMyPermissions() {
  return request({
    url: '/mypermissions'
  })
}
